package com.imay.live.adapter.family;

import android.widget.ImageView;

import com.chad.library.adapter.base.BaseMultiItemQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.chad.library.adapter.base.entity.MultiItemEntity;
import com.imay.live.R;
import com.imay.live.utils.GlideUtil;

import java.util.List;

/**
 * Created by Administrator on 2017/9/3 0003.
 */

public class FamilyHomeAdapter extends BaseMultiItemQuickAdapter<MultiItemEntity, BaseViewHolder> {

    public final static int VIEWTYPE_LINEAR_CONTENT = 0x114;//推荐结果

    public FamilyHomeAdapter(List<MultiItemEntity> data) {
        super(data);
        addItemType(VIEWTYPE_LINEAR_CONTENT, R.layout.item_family_home);
    }

    @Override
    protected void convert(BaseViewHolder helper, MultiItemEntity item) {
        if (item.getItemType() == VIEWTYPE_LINEAR_CONTENT) {
            ImageView civ_item_family_home_img = helper.getView(R.id.civ_item_family_home_img);
            GlideUtil.loadCircleImage(civ_item_family_home_img,"http://img.imay.com/head-36209-1504698517-2297.jpg",  R.mipmap.placeholder);
            helper.setText(R.id.tv_item_family_home, "族长");
        }
    }
}
